package metier;

import java.sql.Date;


public class Intervention {
	
	private int idIntervention;
	private String typeIntervention;
	private java.sql.Date dateIntervention;
	
	
	// GETTEURS & SETTEURS
	
	public int getIdIntervention() {
		return idIntervention;
	}
	
	public void setIdIntervention(int idIntervention) {
		this.idIntervention = idIntervention;
	}
	public String getTypeIntervention() {
		return typeIntervention;
	}
	public void setTypeIntervention(String typeIntervention) {
		this.typeIntervention = typeIntervention;
	}
	public java.sql.Date getDateIntervention() {
		return dateIntervention;
	}
	public void setDateIntervention(java.sql.Date dateIntervention) {
		this.dateIntervention = dateIntervention;
	}
	
	// To string
	
	@Override
	public String toString() {
		return "Intervention [idIntervention=" + idIntervention
				+ ", typeIntervention=" + typeIntervention
				+ ", dateIntervention=" + dateIntervention + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((dateIntervention == null) ? 0 : dateIntervention.hashCode());
		result = prime * result + idIntervention;
		result = prime
				* result
				+ ((typeIntervention == null) ? 0 : typeIntervention.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Intervention other = (Intervention) obj;
		if (dateIntervention == null) {
			if (other.dateIntervention != null)
				return false;
		} else if (!dateIntervention.equals(other.dateIntervention))
			return false;
		if (idIntervention != other.idIntervention)
			return false;
		if (typeIntervention == null) {
			if (other.typeIntervention != null)
				return false;
		} else if (!typeIntervention.equals(other.typeIntervention))
			return false;
		return true;
	}

	// CONSTRUCTEUR 
	
	public Intervention(int idIntervention, String typeIntervention,
			Date dateIntervention) {
		super();
		this.idIntervention = idIntervention;
		this.typeIntervention = typeIntervention;
		this.dateIntervention = dateIntervention;
	}
	
	
	

}
